<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body{
          margin: 0;
          padding: 0;
      }

      ul{
        position: relative;
      }

      li{
        cursor: pointer;
        list-style: none;
      }

      .wb::after{
          position: absolute;
          top: 9px;
          left: 75px;
          display: block;
          content: '';
          width: 9px;
          height: 5px;
          background: url(./images/icon.png) no-repeat 0 -355px;
         
      }

      .wb{
        width: 50px;
        height: 20px;
        border: 1px solid #ff8400;
      }

      .dropdown{
        position: absolute;
        display: none;
        top: 22px;
        left: 0;
      }

      .dropdown li{
        border: 1px solid #ff8400;
        border-top: 0;
        width: 50px;
        height: 20px;
      }

    </style>
  </head>
  <body>
    <div>
        <ul>
          <li class="wb" >微博
              <ul class="dropdown" >
                <li>私信</li>
                <li>评论</li>
                <li>@我</li>
              </ul>
          </li>
        </ul>
    </div>
    <script>
      var dropdown=document.querySelector('.dropdown');
      var wb=document.querySelector('.wb');
      wb.onmouseover=function(){
          dropdown.style.display='block';
      }

      wb.onmouseout=function(){
        dropdown.style.display='none';
      }
    </script>
  </body>
</html>
